# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AdMob.V1.Model.ReportHeader do
  @moduledoc """
  Groups data helps to treat the generated report. Always sent as a first message in the stream response.

  ## Attributes

  *   `dateRange` (*type:* `GoogleApi.AdMob.V1.Model.DateRange.t`, *default:* `nil`) - The date range for which the report is generated. This is identical to the range specified in the report request.
  *   `localizationSettings` (*type:* `GoogleApi.AdMob.V1.Model.LocalizationSettings.t`, *default:* `nil`) - Localization settings of the report. This is identical to the settings in the report request.
  *   `reportingTimeZone` (*type:* `String.t`, *default:* `nil`) - The report time zone. The value is a time-zone ID as specified by the CLDR project, for example, "America/Los_Angeles".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :dateRange => GoogleApi.AdMob.V1.Model.DateRange.t() | nil,
          :localizationSettings => GoogleApi.AdMob.V1.Model.LocalizationSettings.t() | nil,
          :reportingTimeZone => String.t() | nil
        }

  field(:dateRange, as: GoogleApi.AdMob.V1.Model.DateRange)
  field(:localizationSettings, as: GoogleApi.AdMob.V1.Model.LocalizationSettings)
  field(:reportingTimeZone)
end

defimpl Poison.Decoder, for: GoogleApi.AdMob.V1.Model.ReportHeader do
  def decode(value, options) do
    GoogleApi.AdMob.V1.Model.ReportHeader.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AdMob.V1.Model.ReportHeader do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
